package cn.tedu.qxhouserent.house.controller;

import cn.tedu.qxhouserent.commons.web.JsonResult;
import cn.tedu.qxhouserent.house.pojo.vo.LeaseTypeListItemVO;
import cn.tedu.qxhouserent.house.pojo.vo.OrientationListItemVO;
import cn.tedu.qxhouserent.house.service.LeaseTypeService;
import cn.tedu.qxhouserent.house.service.OrientationService;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/lease-type")
@Api(tags = "租赁方式管理模块")
@Slf4j
public class LeaseTypeController {

    @Autowired
    private LeaseTypeService leaseTypeService;


    @GetMapping("/list")
    @ApiOperation("查询租赁方式列表")
    @ApiOperationSupport(order = 420)
    public JsonResult list() {
        log.debug("开始处理【查询租赁方式列表】的请求，参数: 无");

        List<LeaseTypeListItemVO> list = leaseTypeService.list();
        return JsonResult.ok(list);
    }

}
